package com.imodia.checkoo.webtag;

import org.springframework.web.servlet.tags.RequestContextAwareTag;

import com.hsq.commons.util.BeanFactory;
import com.imodia.checkoo.bean.CmsOfferJobBean;
import com.imodia.checkoo.service.CmsOfferJobService;


public class JobTag extends RequestContextAwareTag{
	private static final long serialVersionUID = -1764906844122921796L;
	private TldParam tldParam;

	public TldParam getTldParam() {
		return tldParam;
	}

	public void setTldParam(TldParam tldParam) {
		this.tldParam = tldParam;
	}

	
	@Override
	protected int doStartTagInternal() {
		CmsOfferJobService cmsOfferJobService = (CmsOfferJobService) BeanFactory.getBean("cmsOfferJobService");
		CmsOfferJobBean offerJob = cmsOfferJobService.get(tldParam.getJobId());
		pageContext.setAttribute("JobTag", offerJob);
		return EVAL_BODY_INCLUDE;
	}
}
